<template>
  <van-tabbar v-model="active" >
    <van-tabbar-item v-for="item in tabbarlist"
                     :icon="item.icon"
                     :value="item.value"
                     :dot="item.dot"
                     :info="item.info"
                     :to="item.to">
      {{item.text}}
    </van-tabbar-item>

  </van-tabbar>
</template>
<script>
  import {mapState} from 'vuex'
  export default {
    name: 'h-tabbar',
    data(){
      return{

      }
    },
    computed:{
      tabbarlist(){
        return this.$store.state.base.tabbarlist
      },
      active: {
        get:function(){
          return this.$store.state.base.tabbarActive;
        },
        set: function(active) {
          this.$store.state.base.tabbarActive = active;
        }
      },


    },


  }

</script>
